//Created by Joanna Tan
Ext.define("MajorProjectSenchaTouch.view.SearchModule.BasicFilter",{
    extend: 'Ext.Panel',
    xtype: 'basicfilter',
    requires: [
    'Ext.field.Toggle', 'Ext.field.Search'
    ],
    config:{
        xtype: 'panel',
        id: 'basicPanel',

        items: [
        {     
            html: ['<header class="basicTitle">Basic Search</header>']
        },
        {
            xtype: 'panel',
            id: 'searchPanWrapper',
            items: [
            {
                xtype: 'searchfield',
                name : 'search',
                id: 'basicsearchField',
                placeHolder: 'Search'
            }, 
            {
                xtype: 'selectfield',
                name: 'type',
                ui: 'light',
                usePicker: true,
                id: 'basicselectField',
                options: [
                {
                    text: 'By Keyword Anywhere',
                    value: 'KeywordAnywhere'
                },
                {
                    text: 'By Author',
                    value: 'Author'
                },
                {
                    text: 'By Title',
                    value: 'Title'
                },
                {
                    text: 'By Subject',
                    value: 'Subject'
                }
                ]
            },
            ]
        },
        {
            xtype: 'panel',
            id: 'searchBtnWrapper',
            items: [{
                xtype: 'button',
                id: 'basicSearchBtn',
                pressedCls:'rsBtnClicked',
                labelWrap: true,
                ui: 'normal',
                text: 'Search!',
                height: '6.5em',
                action: 'goSearchResult'
            }]
        },
        {
            xtype:'panel',
            id: 'togglePanWrapper',
            layout: {
                type: 'vbox'
            },
            items:[
            {
                xtype: 'togglefield',
                label: 'Search as a Phrase',
                id: 'toggleFieldbasic',
                name: 'toggle',
                labelWidth: '13.3em',
                labelWrap: true
            }
            ]
        },
        ]
    }
});